package com.winter.dubbo.customer;

import com.alibaba.dubbo.config.annotation.Reference;
import com.winter.dubbo.api.DemoService;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * Created by nana on 2016/11/13.
 */
@Component
public class Customer {

    @Reference
    private DemoService demoService;

    @PostConstruct
    public void run() {
        String res = demoService.sayHello("dubbo");
        System.out.println( res ); // 显示调用结果
    }

}
